<template>
  <div id="Listtransactions">
    <div class="query">
      <!-- --------------- -->
      <div class="homeTitle admin">
        <span>交易列表</span>
        <el-input placeholder="搜索单据编号" v-model="search" class="input-with-select">
          <el-button slot="append" icon="el-icon-search" @click="getdata(1)"></el-button>
        </el-input>
      </div>
      <div class="queryCon">
        <div class="qSeles">
          <!-- 两个选择 -->
          <div class="xuanze">
            <div class="xuanzeCon">
              <span>待办类型：</span>
              <el-select v-model="value" placeholder="请选择" size="small">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </div>
            <div class="xuanzeCon">
              <span>选择行社\机构：</span>
              <el-select v-model="value" placeholder="请选择" size="small">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </div>
            <div class="xuanzeCon">
              <span>当前状态：</span>
              <el-select v-model="value" placeholder="请选择" size="small">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </div>
          </div>
          <!-- 按钮 -->
          <div class="btnAb">
            <el-button type="primary" size="small" @click="getdata(1)">查询</el-button>
            <el-button type="primary" size="small" @click="$router.go(-1);">返回</el-button>
          </div>
        </div>
      </div>
    </div>
    <!-- 表格 -->
    <div class="table">
      <!-- 表格 -->
      <div class="tablecon">
        <el-table :data="tableData" border style="width: 100%">
          <el-table-column prop="date" label="单据编号" align="center"></el-table-column>
          <el-table-column prop="jigou" label="待办类型" align="center"></el-table-column>
          <el-table-column prop="descp" label="行社\机构" align="center"></el-table-column>
          <el-table-column prop="descp" label="交易金额(万元)" align="center"></el-table-column>
          <el-table-column prop="descp" label="交易方向" align="center"></el-table-column>
          <el-table-column prop="descp" label="当前状态" align="center"></el-table-column>
          <el-table-column prop="address" label="操作" align="center" width="172">
            <template slot-scope="scope">
              <el-button size="mini" @click="lookDetail">查看</el-button>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <!-- 分页 -->
      <div class="pgfy">
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="currentPage"
          :page-size="100"
          layout="total, prev, pager, next, jumper"
          :total="400"
        ></el-pagination>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "Listtransactions",
  data() {
    return {
      options: [
        {
          value: "选项1",
          label: "黄金糕"
        },
        {
          value: "选项2",
          label: "双皮奶"
        },
        {
          value: "选项3",
          label: "蚵仔煎"
        },
        {
          value: "选项4",
          label: "龙须面"
        },
        {
          value: "选项5",
          label: "北京烤鸭"
        }
      ],
      value: "",
      search: "",
      tableData: [
        {
          date: "2016-05-02",
          jigou: "预警行社机构",
          descp: "描述",
          leixing: "类型"
        },
        {
          date: "2016-05-02",
          jigou: "预警行社机构",
          descp: "描述",
          leixing: "类型"
        },
        {
          date: "2016-05-02",
          jigou: "预警行社机构",
          descp: "描述",
          leixing: "类型"
        },
        {
          date: "2016-05-02",
          jigou: "预警行社机构",
          descp: "描述",
          leixing: "类型"
        },
        {
          date: "2016-05-02",
          jigou: "预警行社机构",
          descp: "描述",
          leixing: "类型"
        }
      ],
      // 分页
      currentPage: 1
    };
  },
  mounted: {

  },
  methods: {
    // 分页
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    // 分页
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    },
    lookDetail() {
      this.$router.push("opponentAccount");
    },
    xinzeng() {
      this.$router.push("bondDetails");
    }
  }
};
</script>

<style lang="scss">
#Listtransactions {
  .homeTitle {
    &.admin {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0 20px;
      border-bottom: 1px solid black;
      .el-input {
        width: 300px;
      }
    }
  }
  .queryCon {
    background: white;
    padding: 0 20px 20px;
    .qSeles {
      padding-top: 20px;
      .xuanze {
        display: flex;
        align-items: center;
        margin-bottom: 10px;
        flex-wrap: wrap;
        .xuanzeCon {
          height: 40px;
          display: flex;
          align-items: center;
          margin-right: 30px;
          .el-input {
            width: 200px;
          }
        }
      }
      .btnAb {
        margin-top: 30px;
        .el-button {
          margin-right: 30px;
        }
      }
    }
  }
  .table {
    background: white;
    .tablecon {
      padding: 20px;
    }
    .pgfy {
      padding: 20px;
      padding-top: 10px;
      text-align: right;
    }
  }
}
</style>
